package com.hy.admin.dao;

import java.util.List;

import com.hy.admin.helper.response.NewsListResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.hy.admin.entity.NewsEntity;

@Repository
public interface NewsDao {
    int deleteByPrimaryKey(Long id);

    int insert(NewsEntity record);

    int insertSelective(NewsEntity record);

    NewsEntity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(NewsEntity record);

    int updateByPrimaryKey(NewsEntity record);

    int updateRecommend(@Param("id") Long id, @Param("isRecommend") Integer isRecommend);

    List<NewsListResponse> selectAll();

    int deleteByIds(List<Long> idList);

    List<NewsEntity> selectByKeyWord(@Param("keyWord")String keyWord);

    List<NewsEntity> selectByIsRecommend();
}